package com.wande.dataplatform.filecollection.transform.impl;

import com.wande.dataplatform.filecollection.transform.ITransformFunction;
import org.springframework.stereotype.Component;

/**
 * 转小写函数
 *
 * @author wande
 */
@Component
public class LowerCaseFunction implements ITransformFunction {

    @Override
    public String getName() {
        return "LOWER";
    }

    @Override
    public String getDescription() {
        return "将字符串转换为小写";
    }

    @Override
    public Object transform(Object value, String params) {
        if (value == null) {
            return null;
        }
        return value.toString().toLowerCase();
    }
}
